package cn.ito.zjgsu.utils.impl;

import java.text.ParseException;
import java.text.SimpleDateFormat;
import java.util.Date;

public class GetTime {
	public static final GetTime dao =new GetTime();
	SimpleDateFormat df = new SimpleDateFormat("yyyy-MM-dd HH:mm:ss");
	SimpleDateFormat df1 = new SimpleDateFormat("yyyy-MM-dd");
	
	public Date getTime1(String str) throws ParseException{
		return df1.parse(str);
	}
	public Date getTime2(String str) throws ParseException{
		return df.parse(str);
	}
	public Date getTime()
	{
		Date date =new Date();
		String time=df.format(date);
		try {
			return df.parse(time);
		} catch (ParseException e) {
			// TODO Auto-generated catch block
			System.out.println(e.toString());
		}
		return null;
	}

	
}
